package com.app.couponsharelife.data.bean

import android.os.Parcel
import android.os.Parcelable

/**
 *Created by xct on 2019/1/28
 *Description:
 */
data class OrderClassBean(
        var id: String = "",
        var type: String = "",
        var name: String = ""
) : Parcelable {
    constructor(source: Parcel) : this(
            source.readString(),
            source.readString(),
            source.readString()
    )

    override fun describeContents() = 0

    override fun writeToParcel(dest: Parcel, flags: Int) = with(dest) {
        writeString(id)
        writeString(type)
        writeString(name)
    }

    companion object {
        @JvmField
        val CREATOR: Parcelable.Creator<OrderClassBean> = object : Parcelable.Creator<OrderClassBean> {
            override fun createFromParcel(source: Parcel): OrderClassBean = OrderClassBean(source)
            override fun newArray(size: Int): Array<OrderClassBean?> = arrayOfNulls(size)
        }
    }
}